import { defineStore } from 'pinia';
import { ref } from 'vue';
export const useCount = defineStore(
  'count',
  () => {
    const num = ref(0);
    const addNum = () => {
      num.value++;
    };
    return { num, addNum };
  },
  {
    persist: true, // 开启持久化
  },
);